package com.tone.ji_volunteer.mapper;

import com.tone.ji_volunteer.pojo.Log;
import com.tone.ji_volunteer.pojo.OperateLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author tone(ang)
 * version 1.0
 */
@Mapper
public interface LogMapper {

    @Insert("insert into ji_volunteer.act_log(create_time, description) " +
            "values (#{createTime}, #{description})")
    void insert(Log log);

    @Insert("insert into ji_volunteer.operate_log(operate_user, operate_time, class_name, " +
            "method_name, method_params, return_value, cost_time)" +
            "values (#{operateUser},#{operateTime},#{className},#{methodName},#{methodParams}," +
            "#{returnValue},#{costTime})")
    void insertLog(OperateLog operateLog);
}
